#ifndef TICKER_H
#define TICKER_H

#include <QtWidgets/QWidget>
#include "ui_ticker.h"

class Ticker : public QWidget
{
	Q_OBJECT

public:
	Ticker(QWidget *parent = 0);
	~Ticker();

public:
	void setText(const QString& newText);
	QString text() const {return myText;}
	QSize sizeHint() const;
protected:
	virtual void paintEvent(QPaintEvent * event);
	virtual void showEvent(QShowEvent * event);
	virtual void hideEvent(QHideEvent * event);
private:
	Ui::TickerClass ui;
	QString myText;
	int offset;
	int myTimerId;
};

#endif // TICKER_H
